global set_cr3
global enable_paging
global paging
global disable_paging
global get_cr2
global get_cr3

set_cr3:
	mov eax, [esp+4]
	mov cr3, eax
	ret
	
get_cr3:
	mov eax, cr3
	ret
	
get_cr2:
	mov eax, cr2
	ret

enable_paging:
  	mov eax,cr0
	or eax,80000000h
	mov cr0,eax
	ret
	
disable_paging:
  	mov eax,cr0
	mov ebx,80000000h
	not ebx
	and eax, ebx
	mov cr0,eax
	ret

	
paging:
	mov eax,cr0
	and eax,80000000h
	ret
